package demo1;

//顺序表底层结构就是一个数组
//顺序表时使用数组来完成的一种结构
//顺序表的只有一个前驱，只有一个后继
public class Test {
    public static void main(String[] args) {
        final int ED = 10;
        MyArrayList myArrayList = new MyArrayList(5);
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);
        myArrayList.add(5);
        //myArrayList.add(-9 , 199);
        myArrayList.add(0 , 199);
        myArrayList.display();
        System.out.println();
        System.out.println(myArrayList.contains(2));
        System.out.println(myArrayList.indexOf(1));
        System.out.println(myArrayList.get(0));


    }

}
